-LRB- CNN -RRB- -- Rafael Nadal is back .

After battling a knee injury which threatened to derail his glittering career , the Spaniard is back on track and back on top following a 6-2 3-6 6-4 6-1 win over world No. 1 Novak Djokovic in the U.S. Open final .

The second seed recovered from losing the second set and emerged victorious from an energy-sapping third to win his 13th grand slam and his 22nd consecutive hard-court match .

The Mallorcan , who added the Flushing Meadows title to the French Open crown he clinched earlier this year , now trails only Pete Sampras -LRB- 14 -RRB- and his great rival Roger Federer -LRB- 17 -RRB- in the list of all-time major winners .

He also now holds a significant lead over Djokovic in the race to end 2013 at the top of the world rankings .

Not bad for a player whose ability to compete at the highest level was called into question in June after a straight-sets defeat to 135th-ranked Steve Darcis in the first round of Wimbledon .

`` I never thought something like this could happen , I 'm so excited to be back on tour trying to be competitive , '' Nadal told the U.S. Open 's official website after avenging his final defeat to Djokovic in the 2011 final .

`` But I never thought about competing for what I have competed for this year , all the Masters 1000s , two grand slams ... so it is just more than a dream for me .

`` I 'm very happy for everything . It 's true that I worked , but you need luck to be where I am today . ''

Blog : Can Serena become the greatest ever ?

Six-time grand slam champion Djokovic has now tasted defeat in consecutive U.S. Open finals , his latest disappointment coming after his loss to Andy Murray in the 2012 title match .

In fact , the Serb has been in four consecutive finals of the New York grand slam , his only victory coming against Nadal two years ago .

`` All the credit to him , '' said Djokovic after the 37th meeting between the two players . `` I had my momentum from midway through the second set to end of the third where I was supposed to use it and realize the opportunities that were presented to me .

`` I did n't do it . I did n't deserve to win in the end .

`` It 's obviously disappointing to lose a match like this , but again it was a huge privilege and honor to be fighting for this trophy . ''

@highlight

Rafael Nadal wins second U.S. Open title , 13th grand slam

@highlight

He won three of four sets , dropping only the second

@highlight

He has made triumphant return from knee injury